function funClock() {
var runTime = new Date();
var weekday=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
var day = weekday[runTime.getDay()];
var date = runTime.getDate();
var monthNames = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
var month = monthNames[runTime.getMonth()];
var year = runTime.getFullYear();
var hours = runTime.getHours();
var minutes = runTime.getMinutes();
var seconds = runTime.getSeconds();
var dn = "AM";
if (hours >= 12) {
dn = "PM";
hours = hours - 12;
}
if (hours == 0) {
hours = 12;
}
if (minutes <= 9) {
minutes = "0" + minutes;
}
if (seconds <= 9) {
seconds = "0" + seconds;
}
movingtime = day + ", " + date + " " + month + " " + year + " - " + hours + ":" + minutes + ":" + seconds + " " + dn;
var clock = document.getElementById('clock');
clock.innerHTML = movingtime;
setTimeout("funClock()", 1000)
}